<?php
session_start();

//start output buffer
ob_start();

require_once 'include/config.php';
require_once BUSINESS_DIR .'error_handler.php';

//Set The Eror Handler 
ErrorHandler::SetHandler();

//Load Application page template
require_once PRESENTATION_DIR.'application.php';
require_once PRESENTATION_DIR.'link.php';

//Load the Database Handler 
require_once BUSINESS_DIR .'database_handler.php';

//Load the Business Tire 
require_once BUSINESS_DIR .'catalog.php';

//Check request
Link::CheckRequest();



//Load Smarty template file 
$application = new Application();

//Display the page 
$application->display('store_front.tpl');


//Close Database Connection 
DatabaseHandler::Close(); 


//output content from the buffer 
flush();
ob_flush();
ob_end_clean();


?>